package com.jybd.live.mapper;

import com.jybd.live.model.Record;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RecordMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Record record);

    int insertSelective(Record record);

    Record selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Record record);

    int updateByPrimaryKey(Record record);

    @Select("select * from `tb_record` where `app` = #{app} and `stream` = #{stream} order by `stop_time` desc")
    @ResultMap("BaseResultMap")
    List<Record> selectByAppAndStream(@Param("app") String app, @Param("stream") String stream);

}